import request from "@/utils/request";

// 任务列表查询
export function getTaskList(data) {
  return request({
    url: "/system/task/list",
    method: "get",
    params: data,
  });
}

// 添加任务
export function addTaskApi(data) {
  return request({
    url: "/system/task/add",
    method: "post",
    data,
  });
}

// 编辑任务
export function editTaskApi(data) {
  return request({
    url: "/system/task/edit",
    method: "put",
    data,
  });
}

// 任务详情
export function taskDetail(taskId) {
  return request({
    url: "/system/task/listById/" + taskId,
    method: "get",
  });
}

// 成果交付
export function updateTaskApi(data) {
  return request({
    url: "/system/task/update",
    method: "post",
    data,
  });
}

// 成果交付详情
export function deliveryDetail(taskId){
  return request({
    url: "/system/task/listByIds/" + taskId,
    method: "get",
  })
}

// 编辑成果交付
export function editDelivery(data){
  return request({
    url:"/system/task/edits",
    method:"put",
    data
  })
}



// 任务信息的业务类型
export function taskInformationType(data) {
  return request({
    url: "/project/transfer/selectBusinessByProId",
    method: "get",
    params: data,
  });
}

// 删除任务
export function delTaskApi(data) {
  return request({
    url: "/system/task/" + data,
    method: "delete",
  });
}

// 撤回
export function withdrawApi(data) {
  return request({
    url: "/system/task/revoke",
    method: "post",
    data
  })
}



// 点此关联查询
export function approvalLists(data) {
  return request({
    url: "/project/transfer/listss",
    method: "get",
    params:data,
  });
}
